% 绘图
  % s = 0; % 初始化画布
  clc
  clear
load PLOT_1.mat
%PartS_1=cell(1,68)
load PartS_1.mat
a=cell2mat(PartS_1)
for i6 = 1 : size(PLOT_1 ,1)   %%还需要重新更新画布
    F = PLOT_1{i6,1};
    if F(1,1) == 0 && F(1,2) == 0  %判断是否更新画布
        
      % s = s +1;
        
      figure %figure(s); %更新画布
        axis square   %(纵坐标，横坐标每个刻度范围不一样)
        set(gca,'xLim',[0,2000]); %板材纵向排列
        set(gca,'yLim',[0,10000]);        
%         set(gca,'xlim',[0,2440]); %板材纵向排列
%         set(gca,'ylim',[0,1220]);        
        rectangle('Position',F,"LineWidth",1);%（具有尖角的矩阵）
       % title('排样图');
    else
        rectangle('Position',F,"LineWidth",1);
    end
    if F(1,4)~=0
    text(F(1,1)+F(1,3)/2,F(1,2)+F(1,4)/2,num2str(a(1 , i6)),"FontName","Times New Roman","FontSize",13,"LineWidth",20); % 标记零件序号
    end
end